package cn.lizemin.prototype.version0;

/**
 * @author lzm
 * @version 1.0
 * @description: TODO
 * @date 2022/5/20 9:51
 */
public class EnemyPlaneFactory {
    private static EnemyPlane enemyPlane = new EnemyPlane(200);

    public static EnemyPlane getInstance(int x) throws CloneNotSupportedException {
//        复制原型机
        EnemyPlane clone = enemyPlane.clone();
//        重新设置克隆机的x坐标
        clone.setX(x);
        return clone;
    }

}
